﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Data;
using Passwords.Models;
using System.Windows;

namespace Passwords.Utils
{
    public class AppDisplayModeToVisibilityConverter:IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            AppDisplayMode mode = (AppDisplayMode)value;
            AppDisplayMode target = (AppDisplayMode)parameter;

            //return mode == target ? Visibility.Visible : Visibility.Hidden;
            return mode == target ? Visibility.Visible : Visibility.Collapsed;
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
